package com.wxc.common.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

public class PhoneValidator {
    @Constraint(validatedBy = PhoneRule.class)
    @Target({ElementType.METHOD, ElementType.FIELD})
    @Retention(RetentionPolicy.RUNTIME)
    @Documented
    public @interface phone {
        String message() default "手机号格式不合法";

        Class<?>[] groups() default {};

        Class<? extends Payload>[] payload() default {};
    }
}
